<?php

namespace app\command;

use app\popo\model\Employee;
use support\Redis;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;


class ConfigMysql extends Command
{
    protected static $defaultName = 'config:mysql';
    protected static $defaultDescription = 'config mysql';

    /**
     * @return void
     */
    protected function configure()
    {
        $this->addArgument('name', InputArgument::OPTIONAL, 'Name description');
    }

    /**
     * @param InputInterface $input
     * @param OutputInterface $output
     * @return int
     */
    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        Redis::set("id", 333);
        $employee = Employee::query()->find(1);
        $output->writeln($employee->name);
        $output->writeln('Hello config:mysql');
        $output->writeln(config('helper.app.wx_app_id'));
        $output->writeln(config('helper.app.wx_app_secret'));
        $output->writeln(config('app.app_url'));
        $output->writeln(get_full_url("minio/sky-take-out/uploads/20250825/68ac730b65430.jpg"));
        $output->writeln(Redis::get("id"));
        return self::SUCCESS;
    }

}
